package com.csxy.yhj.controller;

import com.csxy.yhj.R;
import com.csxy.yhj.entity.CrmBanner;
import com.csxy.yhj.service.CrmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cmsservice/bannerFront")
public class BannerFrontController {
    @Autowired
    private CrmService crmService;

    @GetMapping("getAll/")
    public R getAll() {
        List<CrmBanner> list = crmService.getAllBanner();
        return R.ok().data("list", list);
    }
}
